package com.limf.demo.java8;

public class Lambda4 {

	static int outerStaticNum;
	int outerNum;
	void testScopes() {
		Converter<Integer, String> stringConverter1 = (from)-> {
			//outerNum = 23;
			//outerNum = 25;
			System.out.println("outerStaticNum:"+outerStaticNum + "---outerNum:"+outerNum);
			return String.valueOf(from);
		};
		Converter<Integer, String> stringConverter2 = (from) -> {
			//outerStaticNum = 72;
			System.out.println("outerStaticNum:"+outerStaticNum + "---outerNum:"+outerNum);
			return String.valueOf(from);
		};
	}
	public static void main(String[] args) {
		Lambda4 lam = new Lambda4();
		outerStaticNum = 22;
		lam.outerNum = 23;
		lam.testScopes();
		System.out.println("outerStaticNum:"+outerStaticNum + "---outerNum:"+lam.outerNum);
	}
	
	void testFormula() {
		//Formula formula = (a)->sqrt(a * 100);
		
	}
}
